﻿namespace WayneGameSolution.Chat
{
    using System;
    using System.Collections.Generic;
    using WayneGameSolution.Membership;
    using System.ServiceModel;
    [ServiceContract]
    public interface IChatChannel
    {
        /// <summary>
        /// 清所有信息
        /// </summary>
        void Clear();
        /// <summary>
        /// 清所有过期信息
        /// </summary>
        void ClearTimeouted();
        /// <summary>
        /// 得到用户所有未读信息
        /// </summary>
        /// <param name="user">查信息的用户</param>
        /// <returns>所有未读的信息</returns>
        /// 
        [OperationContract]
        IEnumerable<IChatMessage> GetUserMessage(string user);
        /// <summary>
        /// 收到信息
        /// </summary>
        /// <param name="message">发送的消息</param>
        /// 
        [OperationContract]
        void ReceiveMessage(IChatMessage message);
        /// <summary>
        /// 频道ID
        /// </summary>
        /// 

        string ID { get; }

        IDictionary<string,DateTime > LastReceivedTime { get; }



        string Name { get; }

        int TimeoutSecond { get; set; }

        ChannelType Type { get; }

  
    }

    public enum ChannelType
    {
        PublicChannel,
        AreaChannel,
        GuildChannel,
        TemporyChannel,
        TeamChannel
    }
}

